Page({
  data: {
    value: '',
    activeTab: 'male', // 默认激活的标签页
    hotGoods: [{
      id: 0,
      title: "赫柏林",
      title2: "Perles珍珠系列",
      price: "26976",
      image: "../../image/02.jpg"
    },
    {
      id: 1,
      title: "爱宝时",
      title2: "Artistry艺术系列",
      price: "34645",
      image: "../../image/03.jpg"
    },
    {
      id: 2,
      title: "东方星",
      title2: "大师系列",
      price: "53332",
      image: "../../image/04.jpg"
    },
    {
      id: 3,
      title: "爱宝时",
      title2: "Timeless永恒系列",
      price: "18222",
      image: "../../image/05.jpg"
    }
  ],
    maleGoods: [{
        id: 0,
        title: "赫柏林",
        title2: "Perles珍珠系列",
        price: "26976",
        image: "../../image/02.jpg"
      }
    ],
    femaleGoods: [
      {
        id: 1,
        title: "爱宝时",
        title2: "Artistry艺术系列",
        price: "34645",
        image: "../../image/03.jpg"
      },
      {
        id: 3,
        title: "爱宝时",
        title2: "Timeless永恒系列",
        price: "18222",
        image: "../../image/05.jpg"
      }
    ],
    query: {},
  },
  onChange(e) {
    this.setData({
      value: e.detail,
    });
  },
  todetail: function (e) {
    var id = e.currentTarget.dataset.id;

    wx.navigateTo({
      url: '/pages/details/details?id=' + id
    });
  },
  onLoad: function (options) {
    this.setData({
      query: options 
    })
  },
  onReady: function () {
    wx.setNavigationBarTitle({
      title: this.data.query.title
    })
  },
  onShareAppMessage() {
    return {
      title: this.data.query.title,
      path: '/pages/index/index'
    }
  },
  onSearch() {
    wx.showToast({
      title: '搜索' + this.data.value,
      icon: 'none'
    });
  },
})